package ooday03;

public class Test11 {
    public static void main(String[] args) {
        Dog1[] dogs = new Dog1[2];
        dogs[0] = new Dog1("小黑",1,"黑");
        dogs[1] = new Dog1("小白",2,"白");
        for(int i = 0;i< dogs.length;i++){
            dogs[i].eat();
            dogs[i].lookHome();
            dogs[i].swim1();
        }

        Chick1[] chicks = new Chick1[2];
        chicks[0] = new Chick1("花花",1,"棕");
        chicks[1] = new Chick1("小花花",2,"灰");
        for (int i = 0;i< chicks.length;i++){
            chicks[i].eat();
            chicks[i].drink();
            chicks[i].layEgg();
        }

        Fish1[] fish = new Fish1[2];
        fish[0] = new Fish1("小金",1,"金");
        fish[1] = new Fish1("泡泡",2,"红");
        for (int i = 0;i< fish.length;i++){
            fish[i].eat();
            fish[i].drink();
            fish[i].swim1();
        }
    }
}
